Login and get codingWrite a simple
Promo
class. Its constructor receives two variables:name
(which must be a string) andexpires
(which must be adatetime
object).Add a
property
calledexpired
which returns a boolean value indicating whether the promo has expired or not.Checkout the tests and
datetime
module for more info. Have fun!
1089 out of 1160 users completed this Bite.
Will you be the 1090th person to crack this Bite?
Resolution time: ~36 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 4.5 on a 1-10 difficulty scale.
» Up for a challenge? 💪